package org.wtframework.website.server.model.impl;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;
import org.openredhead.springx.core.server.model.IBasicObject;
import org.openredhead.springx.core.server.model.ICompositorObject;

@Entity
@Proxy(lazy = true)
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
@Table(name = "nzsz_zyk_img")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class WebImage implements IBasicObject, ICompositorObject<Integer> {
	
	private static final long serialVersionUID = -6280233944146657288L;
	
	private Integer id;
	
	private String img_url;
	
	private String link_url;
	
	private String title;

	
	
	public String getTitle() {
		return title;
	}

	
	public void setTitle(String title) {
		this.title = title;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	
	public String getImg_url() {
		return img_url;
	}

	
	public void setImg_url(String img_url) {
		this.img_url = img_url;
	}

	
	public String getLink_url() {
		return link_url;
	}

	
	public void setLink_url(String link_url) {
		this.link_url = link_url;
	}
	
	@Override
	public boolean equals(Object o) {

		if (o == null) return false;

		if (!(o instanceof WebTrends)) return false;

		final WebTrends instance = (WebTrends) o;

		if (getId() != null ? !getId().equals(instance.getId()) : instance.getId() != null) return false;

		return true;

	}

	@Override
	public Integer getOrderId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setOrderId(Integer orderId) {
		// TODO Auto-generated method stub
		
	}

}
